package cn.tedu.spring.di;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component //控制器
//@Controller
//@Service
//Repository
public class UserDao {
    @Value("jdbc:mysql://localhose:3306/tedu")
    private String url;
    @Value("root")
    private String username;
    //@Value("root")
    private String password;


    @Override
    public String toString() {
        return "UserDao{" +
                "url='" + url + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
    @Value("root")
    public void setPassword(String password) {
        this.password = password;
    }
}
